Skip to content

Conversation

@mromaios
Copy link
Contributor

@mromaios mromaios commented Oct 20, 2025

Closes #133453

This PR fixes edge cases where the generated test embeddings could become negative.

  • Math.abs can overflow when the provided int is Integer.MIX_VALUE causing a negative embedding value
  • The expression <abs(hashCode)> + 1 + position was computed as an int which can also overflow if the absolute value is close to Integer.MAX_VALUE

@mromaios mromaios self-assigned this Oct 20, 2025
@mromaios mromaios added >test Issues or PRs that are addressing/adding tests :SearchOrg/Relevance Label for the Search (solution/org) Relevance team labels Oct 20, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-relevance (Team:Search - Relevance)

@elasticsearchmachine elasticsearchmachine added Team:Search - Relevance The Search organization Search Relevance team v9.3.0 labels Oct 20, 2025
@mromaios mromaios changed the title test(ShardBulkInferenceActionFilterIT): prevent negative embedding values test(TestInferenceService): prevent negative embedding values Oct 20, 2025
@mromaios mromaios marked this pull request as draft October 20, 2025 13:52
@mromaios mromaios marked this pull request as ready for review October 20, 2025 15:37
Copy link
Contributor

@Mikep86 Mikep86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Can we also backport this as far back as 8.19? This test code has been around for a while and it's only a matter of time until get failures for those releases as well.

@mromaios mromaios added auto-backport Automatically create backport pull requests when merged v8.19.6 v9.1.6 v9.0.9 v9.2.1 labels Oct 21, 2025
@mromaios
Copy link
Contributor Author

LGTM! Can we also backport this as far back as 8.19? This test code has been around for a while and it's only a matter of time until get failures for those releases as well.

Sure, on it.

@mromaios mromaios merged commit 9d63517 into elastic:main Oct 21, 2025
34 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 136806

@mromaios
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.2
9.1
9.0
8.19

Questions ?

Please refer to the Backport tool documentation

mromaios added a commit to mromaios/elasticsearch that referenced this pull request Oct 21, 2025
mromaios added a commit to mromaios/elasticsearch that referenced this pull request Oct 21, 2025
mromaios added a commit to mromaios/elasticsearch that referenced this pull request Oct 21, 2025
mromaios added a commit that referenced this pull request Oct 21, 2025
mromaios added a commit that referenced this pull request Oct 21, 2025
mromaios added a commit that referenced this pull request Oct 21, 2025
@mromaios mromaios removed the v9.0.9 label Oct 21, 2025
chrisparrinello pushed a commit to chrisparrinello/elasticsearch that referenced this pull request Oct 24, 2025
fzowl pushed a commit to voyage-ai/elasticsearch that referenced this pull request Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged backport pending :SearchOrg/Relevance Label for the Search (solution/org) Relevance team Team:Search - Relevance The Search organization Search Relevance team >test Issues or PRs that are addressing/adding tests v8.19.6 v9.1.6 v9.2.1 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] ShardBulkInferenceActionFilterIT testRestart {p0=false p1=true} failing

3 participants